<!DOCTYPE html>
<html lang='zh-CN'>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <include file="Public/title"/>
    <style type="text/css">
        #container {
            width: 450px;
            height: 350px;
            margin-top: 10px;
        }

        .label {
            margin-left: 20px;
            font-weight: bold;
            font-size: 14px
        }

        .lng-lat {
            margin: 15px 0px 10px 0px;
        }

        .lng-lat .item {
            margin: 10px;
        }

        #longitude {
            margin-right: 10px;
        }
    </style>
</head>

<body>
<div class="mainWrap">

    <!--标题-->
    <div class="mainWrapHeader">
        <h1 class="mainWrapTit">{$seotitle}</h1>
    </div>
    <!--标题-->

    <form action="{:U('save',array('action'=>'add'))}" method="post" class="dataForm" id="dataForm">
        <div class="mainWrapBd">
            <div class="tab-con" id="tab-works">
                <table cellpadding="0" border="0" cellspacing="0" class="stdedit">
                    <tr>
                        <th>店铺名称</th>
                        <td><input type="text" name="store_name" id="store_name" class="sys_text"/></td>

                        <th>店长名字</th>
                        <td><input type="text" name="manager_name" id="manager_name" class="sys_text"/></td>
                    </tr>
                    <tr>
                        <th>登录账号（手机号）</th>
                        <td><input type="text" name="mobile" id="mobile" class="sys_text"/></td>
                        <th>店铺头像</th>
                        <td>
                            <input type="hidden" name="headimg" id="headimg"/>
                            <img id="headimg_img" src="" alt="" style="width:240px">
                            <a href="javascript:;" onclick="getOneFile('headimg', 'image')"
                               class="btn btn_orange btn_inboxo"><span>上传</span></a>
                        </td>
                    </tr>
                    <tr>
                        <th>登录密码</th>
                        <td><input type="password" name="password" id="password" class="sys_text" maxlength="18"/></td>
                        <th>座机电话（选填）</th>
                        <td><input type="text" name="telephone" id="telephone" class="sys_text"/></td>
                    </tr>
                    <tr>
                        <th>所在地区:</th>
                        <td>
                            <select id="province1" name="province1" onchange="chooseProvince(this)">
                                <option value="0">请选择省</option>
                            </select>
                            <select id="city1" name="city1" onchange="chooseCity(this)">
                                <option value="0">请选择市</option>
                            </select>
                            <select id="area1" name="area1" onchange="chooseArea(this)">
                                <option value="0">请选择区</option>
                            </select>
                            <input type="hidden" id="province" name="province" value="">
                            <input type="hidden" id="city" name="city" value="">
                            <input type="hidden" id="area" name="area" value="">
                        </td>
                        <th>详细地址</th>
                        <td><input type="text" name="address" class="sys_text" id="suggestId"/></td>
                    </tr>
                    <tr>
                        <th>经纬度</th>
                        <td colspan="3">
                            <div id="container"></div>
                            <div class="lng-lat">
                                <div class="item">
                                    当前经度:
                                    <input type="text" id="longitude" name="longitude"/>
                                    当前纬度:
                                    <input type="text" id="latitude" name="latitude"/>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>广告位</th>
                        <td colspan="3">
                            <?php
                                $adsInfo = M('ads')->select();
                            ?>
                            <div class="setWrap ruleWrap ruleWrapCur">
                                <div class="setWrapBody">
                                    <ul class="clearfix ruleList">
                                        <volist name="adsInfo" id="foo">
                                            <li>
                                                <label>
                                                    <input type="checkbox" name="ads[]"
                                                    <if condition="in_array($foo['id'],$alrRuleids)">checked="checked"
                                                    </if>
                                                    value="{$foo['id']}"> {$foo['ad_name']}
                                                    <span class="ruleRules"
                                                          style="display:none;">[{$foo['ad_name']}]</span>
                                                    <img src="/{$foo['filepath']}" style="width:100px;height:100px;"/>
                                                </label>
                                            </li>
                                        </volist>
                                    </ul>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>备注</th>
                        <td><input type="text" name="remark" id="remark" class="sys_text"/></td>
                    </tr>
                </table>
            </div>
            <div class="stdeditSubmit">
                <input type="submit" class="submit" value="提 交"/>
                <input type="button" value="返回上一页" class="reset" onclick="history.go(-1);"/>
            </div>
        </div>
    </form>
</div>
</body>
</html>
<!--表单验证-->
<script type="text/javascript" src="__PUBLIC__/admin/validator/store_add.js"></script>
<!--省市县-->
<script type="text/javascript" src="__PUBLIC__/admin/js/cityPicker.js"></script>
<!--百度地图-->
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=cAdlwxedBYGjWRTIL1IpG8omYOxfYZvW"></script>
<script type="text/javascript" src="__PUBLIC__/admin/map/bdMap.js"></script>